import Vue from 'vue'
import Router from 'vue-router'
import Team from '@/components/team/TeamList'
import leagues from '@/components/team/leagues'
import scrolls from '@/components/public/scrolls'
import header from '@/components/public/header'
import testAddUser from '@/components/front/user/testAddUser'
import backIndex from '@/components/back/index'
import backParents from '@/components/back/parents'
import press from '@/components/front/press'
import parents from '@/components/front/parents'
import frontIndex from '@/components/front/index'
import bookranklist from '@/components/public/bookranklist'
import details from '@/components/front/book/details'
import lhy from '@/components/front/book/lhy'
import index from '@/components/public/'
import publicactivate from '@/components/public/activate'
import frontaddParents from '@/components/front/parents/addParents'


//import bookskind from '@/components/front/bookskind'
import backActive from '@/components/back/active'
import frontActive from '@/components/front/active'
import login from '@/components/login'

import retrieve from '@/components/front/parents/retrieve'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: '  login',
      component:  login
    },

    {
      path: '/Team',
      name: 'Team',
      component: Team
    },
    {
      path: '/leagues',
      name: 'leagues',
      component: leagues
    },
    {
      path: '/scrolls',
      name: 'scrolls',
      component: scrolls
    },
    {
      path: '/header',
      name: 'header',
      component: header
    },
    {
      path: '/testAddUser',
      name: 'testAddUser',
      component: testAddUser
    },
    {
      path: '/front/index',
      name: 'frontIndex',
      component: frontIndex
    },
    {
      path: '/front/press',
      name: 'press',
      component: press
    },
    {
      path: '/front/parents',
      name: 'parents',
      component: parents
    },
    {
      path: '/public/bookranklist',
      name: 'bookranklist',
      component: bookranklist
    },

    {
      path: '/front/book/details',
      name: 'details',
      component: details
    },
    {
      path: '/front/book/lhy',
      name: 'lhy',
      component: lhy
    },
 {
      path: '/public',
      name: 'index',
      component: index
    },
    {
      path: '/back/active',
      name: 'backActive',
      component: backActive
    },

    {
      path: '/front/active',
      name: 'frontActive',
      component: frontActive
    },
    {
      path: '/front/parents/retrieve',
      name: 'retrieve',
      component: retrieve
    },
    {
      path: '/public/activate/:pno',
      name: 'publicactivate',
      component: publicactivate
    },
    {
      path: '/front/parents/addParents',
      name: 'frontaddParents',
      component: frontaddParents
    },


 // {
 //      path: '/front/bookskind',
 //      name: 'bookskind',
 //      component: bookskind
 //    },
    // {
    //   path: '/back/parents',
    //   name: 'backParents',
    //   component: backParents
    // },
    {
      path: '/back',
      name: 'backIndex',
      component: backIndex,
      children: [
        {
          path: '/back/admin',
          component: resolve => require(['@/components/back/admin/'], resolve),
          meta: {title: '管理员管理'}
        },
        {
          path: '/back/books',
          component: resolve => require(['@/components/back/books/'], resolve),
          meta: {title: '图书管理'}
        },
        {
          path: '/back/bookskind',
          component: resolve => require(['@/components/back/bookskind/'], resolve),
          meta: {title: '图书种类管理'}
        },
        {
          path: '/back/children',
          component: resolve => require(['@/components/back/children/'], resolve),
          meta: {title: '儿童管理'}
        },
        {
          path: '/back/parents',
          component: resolve => require(['@/components/back/parents/'], resolve),
          meta: {title: '家长管理'}
        },
        {
          path: '/back/press',
          component: resolve => require(['@/components/back/press/'], resolve),
          meta: {title: '出版社管理'}
        },
        {
          path: '/back/news',
          component: resolve => require(['@/components/back/news/'], resolve),
          meta: {title: '新闻管理'}
        },
        {
          path: '/back/school',
          component: resolve => require(['@/components/back/school/'], resolve),
          meta: {title: '学校管理'}
        },
        {
          path: '/back/activityprizes',
          component: resolve => require(['@/components/back/activityprizes/'], resolve),
          meta: {title: '活动奖品类型管理'}
        },
        {
          path: '/back/activitytype',
          component: resolve => require(['@/components/back/activitytype/'], resolve),
          meta: {title: '活动类型管理'}
        },
        {
          path: '/back/advertisers',
          component: resolve => require(['@/components/back/advertisers/'], resolve),
          meta: {title: '广告商管理'}
        },
        {
          path: '/back/advertisingtype',
          component: resolve => require(['@/components/back/advertisingtype/'], resolve),
          meta: {title: '广告类型管理'}
        },
        {
          path: '/back/carouselmap',
          component: resolve => require(['@/components/back/carouselmap/'], resolve),
          meta: {title: '轮播图管理'}
        },
        {
          path: '/back/clazz',
          component: resolve => require(['@/components/back/clazz/'], resolve),
          meta: {title: '班级管理'}
        },
        {
          path: '/back/festival',
          component: resolve => require(['@/components/back/festival/'], resolve),
          meta: {title: '节日管理'}
        },
        {
          path: '/back/clazz',
          component: resolve => require(['@/components/back/clazz/'], resolve),
          meta: {title: '班级管理'}
        },
        {
          path: '/back/gametype',
          component: resolve => require(['@/components/back/gametype/'], resolve),
          meta: {title: '比赛类型管理'}
        },
        {
          path: '/back/orderdetails',
          component: resolve => require(['@/components/back/orderdetails/'], resolve),
          meta: {title: '订单详情管理'}
        },
        {
          path: '/back/prizetype',
          component: resolve => require(['@/components/back/prizetype/'], resolve),
          meta: {title: '奖品类型管理'}
        },
        {
          path: '/back/region',
          component: resolve => require(['@/components/back/region/'], resolve),
          meta: {title: '地区管理'},
        },
        {
          path: '/back/salesagent',
          component: resolve => require(['@/components/back/salesagent/'], resolve),
          meta: {title: '销售代理管理'},
        },
        {
          path: '/back/subject',
          component: resolve => require(['@/components/back/subject/'], resolve),
          meta: {title: '题目管理'},
        }
    ]}
  ]
})
